# 导入模块
import random


def user_random():
    # 将用户输入的字符串强制转换成数字
    player = int(input("请出拳 石头(1)\\剪刀(2)\\布(3)\n"))

    # 随机生成电脑出拳
    # 注意：random是类名，randint是random中的方法，左闭右闭
    computer = random.randint(1, 3)
    print(player, computer)

    if (player == 1 and computer == 2
            or player == 2 and computer == 3
            or player == 3 and computer == 1):
        print("player win")
    # elif 就是 else if
    elif player == computer:
        print("player and compuer are drawed")
    else:
        print("computer win")


user_random()
